package com.luke.star.enums;

import java.util.HashMap;
import java.util.Map;

public enum AssiCircleModelEnum {
	day("00", "每日"), 
	workday("01","工作日"),
	weekend("02","周末"),
	week("03", "每周"),
	month("04","每月"),
	year("05","每年"),
	;
	
	public String code;
	public String desc;
	private AssiCircleModelEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public static Map<String, String> getDataMap() {
		Map<String, String> keyValueMap = new HashMap<String, String>();
		for (AssiCircleModelEnum single : AssiCircleModelEnum.values()) {
			keyValueMap.put(single.code, single.desc);
		}
		return keyValueMap;
	}
	public static String getDesc(String code) {
		for (AssiCircleModelEnum single : AssiCircleModelEnum.values()) {
			if(single.code.equals(code)) {
				return single.desc;
			}
		}
		return code;
	}
}
